from Selenium2Library import Selenium2Library
from _breeze_common import _BreezeCommonKeywords
#from _vDisplay import _VirtualDisplayKeywords
#from _db import _DBKeywords
from _webservice import _WebServiceKeywords


#class SCBLibrary(Selenium2Library, _BreezeCommonKeywords, _VirtualDisplayKeywords, _DBKeywords, _WebServiceKeywords):
class SCBLibrary(Selenium2Library, _BreezeCommonKeywords,_WebServiceKeywords):

    def __init__(self):
        print 'SCBLibrary.init'
        self._countryCode = ''
        for base in SCBLibrary.__bases__:
            base.__init__(self)

    def set_country_code(self, countryCode):
        self._countryCode = countryCode.lower()

    def _run(self, funcName):
        self._info('running %s() for country:<%s>' % (funcName, self._countryCode))
        if self._countryCode == '':
            raise "country code was not set"
        method = getattr(self, '_' + funcName + '_' + self._countryCode)
        return method()

